package com.wchinasofit.demo;

public class MyTest {
    public  int[] rs(int[]arr) {
        int max = arr[0];
        int sum=0;
        int min = arr[0];
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] > max) {
                max = arr[i];
            }
            if (min > arr[i]) {
                min = arr[i];
            }
            sum=sum+arr[i];
        }
        int count = sum/arr.length;
        int [] maxAndMin = {max,min,count};
        return maxAndMin;

    }
}
